package com.inoneone.youba.mcht.dao.mapper;

import com.inoneone.youba.mcht.dao.po.Card;
import com.inoneone.youba.mcht.dao.po.CardExample;
import com.inoneone.youba.mcht.dao.po.CardInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExtendCardMapper {
    CardInfo countCardInfo(CardExample example);

    /**
     * Description: 更新余额字段</br>
     * Date: 2017-06-27 16:09:20</br>
     *
     * @param
     * @return
     * @author 姬远玄
     * @since JDK 1.7
    */
    int updateBalanceByPrimaryKey(Card record);

    /**
     * Description: 余额字段减少</br>
     * Date: 2017-06-27 17:17:51</br>
     *
     * @param
     * @return
     * @author 姬远玄
     * @since JDK 1.7
    */
    int reduceBalanceByPrimaryKey(Card record);

    /**
     * Description: 消费扣款</br>
     * Date: 2017-08-09 17:24:35</br>
     *
     * @param
     * @return
     * @author 姬远玄
     * @since JDK 1.7
    */
    int payBalanceByPrimaryKey(Card record);

    /**
     * Description: 排它锁查询</br>
     * Date: 2017-06-27 19:09:07</br>
     *
     * @param
     * @return
     * @author 姬远玄
     * @since JDK 1.7
    */
    Card selectByPrimaryKeyForUpdate(String cardId);

}